package com.test;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class readExcel {

    public static void main(String[] args) {
        // 达梦数据库连接信息
        String url = "jdbc:dm://localhost:5236/DAMENG";
        String user = "SYSDBA";
        String password = "SYSDBA";

        try (Connection conn = DriverManager.getConnection(url, user, password)) {
            System.out.println("成功连接到达梦数据库！");
            // 在此执行你的数据库操作...
        } catch (SQLException e) {
            System.err.println("数据库连接失败：");
            e.printStackTrace();
        }
    }
}
